package io.geekidea.springbootplus.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.Version;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Null;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysOrder对象", description = "订单管理")
public class SysOrder extends BaseEntity {

    private static final long serialVersionUID = -2736737946659954114L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("会员编号")
    private Integer memberId;

    @ApiModelProperty("订单流水号")
    private Long orderSn;

    @ApiModelProperty("订单状态")
    private Integer orderStatus;

    @ApiModelProperty("订单时间")
    private Date orderDtate;

    @ApiModelProperty("订单消费总额")
    private BigDecimal totalAmount;

    @ApiModelProperty("订单备注")
    private String notes;

    @ApiModelProperty("运费")
    private BigDecimal fee;

    @ApiModelProperty("配送方式")
    private Integer deliveryMode;

    @ApiModelProperty("支付方式")
    private Integer payMode;

    @ApiModelProperty("支付时间")
    private Date payDate;

    @ApiModelProperty("超长时间")
    private Long expiredPeriod;

    @ApiModelProperty("过期时间")
    private Date expiredDate;

    @ApiModelProperty("订单数据版本号")
    @Version
    private Integer version;

}
